import { connect } from 'react-redux'
import SelectExpress from '../../../views/My/MyOrder/SelectExpress'

function mapStateToProps(state: any) {
    return {
        userInfo: state.user.userInfo,
        selectExpressData: state.user.selectExpressData,
        returnDetail: state.user.returnDetail
    }
}

function mapDispatchToProps(dispatch: (obj: any) => void) {
    return {
        'SET_USER_EXPRESS_DATA': (data: any, status: number) => {
            dispatch({ type: 'SET_USER_EXPRESS_DATA', data, status })
        },
        'SET_USER_RETURN_DETAIL': (data: any) => {
            dispatch({ type: 'SET_USER_RETURN_DETAIL', data })
        },
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(SelectExpress)